<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php e($html->charset()); ?>
<title><?php __($sitename); e(' &rsaquo; '); __($title_for_layout); ?></title>
<?php
  if (is_array($stylesheet)) {
      foreach ($stylesheet as $css) {
          e($html->css($css));
      }
  }
?>
<script type="text/javascript">var _webroot = '<?php e($this->base); ?>';</script>
</head>
<body>

<div class="rel">
  <div class="header">
    <div id="walkin-button" class="mainButton ui-corner-all" onclick="walkIn()"><?php __('Walk-In'); ?></div>
    <div id="reservation-button" class="mainButton ui-corner-all" onclick="reservation.form('Add')"><?php __('Reserve'); ?></div>
    <div id="guests-button" class="mainButton ui-corner-all" onclick="guestProfiles()"><?php __('Guest Profiles'); ?></div>
    <div id="rate-button" class="mainButton ui-corner-all" onclick="rateInfo.open()"><?php __('Rate Information'); ?></div>
    <div id="hotel-button" class="mainButton ui-corner-all" onclick="hotel.open()"><?php __('Hotels Info'); ?></div>
    <div id="exit-button" class="mainButton ui-corner-all" onclick="user.logout()"><?php __('Exit'); ?></div>
    <div class="clear"></div>
  </div>
  <div class="body">
    <div id="content" class="content fLeft">
<?php if ($session->check('Message.flash') || $session->check('Message.auth')) { ?>
      <div id="messageBox" style="margin-bottom:5px;"><?php $session->flash().$session->flash('auth'); ?></div>
      <div class="clear"></div>
<?php } else if ($session->check('Message.email')) { ?>
      <div id="messageBox" style="margin-bottom:5px;"><?php $session->flash('email'); ?></div>
      <div class="clear"></div>
<?php } ?>
<?php e($content_for_layout); ?>
    </div>
    <div class="clear"></div>
  </div>
  <div class="footer">
<?php
      $copyright = $html->link('&copy;', '/', array('style'=>'background-color:transparent;'), false, false);
      e(r(
          array('%copyright%', '%date%', '%sitename%', '%version%'),
          array($copyright, date('Y'), __($sitename,true), '1.0'),
          __('Copyright %copyright% %date% %sitename% %version% &trade;. All rights reserved.', true)
      ));
?>
  </div>
</div>

<div id="login-wrap" title="<?php __('Login'); ?>" class="dialog" style="display:none;">
      <form id="UserLoginForm" method="post" action="<?php e($this->base) ?>/users/login" class="form" onsubmit="return user.login();">
        <table cellpadding="3" cellspacing="0" border="0" style="margin:20px 0 13px;">
          <tr>
            <td><label for="lgn-username"><?php __('Username'); ?>:</label></td>
            <td><input type="text" id="lgn-username" name="username" value="admin" class="validate[required]" /></td>
          </tr>
          <tr>
            <td><label for="lgn-password"><?php __('Password'); ?>:</label></td>
            <td><input type="password" id="lgn-password" name="password" value="abc123" class="validate[required]" /></td>
          </tr>
        </table>
        <div class="formMessage"></div>
        <div class="button">
          <input type="hidden" id="lgn-id" name="id" value="<?php e($user_id); ?>" />
          <button type="submit" id="guest-profile-btn"><?php __('Login'); ?></button>
          <button type="button" class="close" onclick="user.cancel()"><?php __('Cancel'); ?></button>
        </div>
      </form>
</div>

<div id="checkin-wizard" title="<?php __('CheckIn Wizard'); ?>" class="dialog" style="display:none;">
  <div id="checkin-wrap" class="overhide rel" style="width:505px; height:270px;">
    <div class="inner-panel" style="width:1012px; height:270px;">
      <div id="checkin-wrap1" class="fLeft pages" style="width:505px; height:270px;">
        <p class="small"><?php __('First, you must pick a room type the guest would like. Once you pick a room type, the system will find the next room available if a room has not already been assigned in the reservation.'); ?></p>
        <table cellpadding="3" cellspacing="0" border="0" style="margin-top:20px;">
          <tr>
            <td class="bold"><?php __('Room Type'); ?>:</td>
            <td>
<?php
    echo $this->element('room_type_options', array(
        'ext'     => '',
        'loadAll' => false
    ));
?>
            </td>
          </tr>
          <tr>
            <td class="bold"><?php __('CheckOut Date'); ?>:</td>
            <td>
              <input type="text" id="checkout-date" name="checkout" class="validate[required,custom[date2]]" style="width:80px; display:inline; margin-right:1px;" />
              <input type="text" id="showDay" style="border:0; cursor:default; width:90px; display:inline;" />
            </td>
          </tr>
          <tr>
            <td class="bold"><?php __('Adults'); ?>:</td>
            <td>
              <select id="checkin-adults">
                <option value="1">1 <?php __('Adult'); ?></option>
                <option value="2">2 <?php __('Adults'); ?></option>
                <option value="3">3 <?php __('Adults'); ?></option>
                <option value="4">4 <?php __('Adults'); ?></option>
                <option value="5">5 <?php __('Adults'); ?></option>
              </select>
            </td>
          </tr>
          <tr>
            <td class="bold"><?php __('Children'); ?>:</td>
            <td>
              <select id="checkin-children">
                <option value="0"><?php __('No Child'); ?></option>
                <option value="1">1 <?php __('Child'); ?></option>
                <option value="2">2 <?php __('Children'); ?></option>
                <option value="3">3 <?php __('Children'); ?></option>
                <option value="4">4 <?php __('Children'); ?></option>
                <option value="5">5 <?php __('Children'); ?></option>
              </select>
            </td>
          </tr>
        </table>
      </div>
      <div id="checkin-wrap2" class="fLeft pages" style="width:505px; height:270px;">
        <p class="small"><?php __('Now, choose a room which has a status of Vacant, If there is no room number assigned yet, choose one now. The system will first use the preassigned room. If there is no preassigned room, the next available room will appear.'); ?></p>
        <table cellpadding="3" cellspacing="0" border="0" style="margin-top:20px;">
          <tr>
            <td class="bold"><?php __('Room Number'); ?>:</td>
            <td>
              <input type="text" id="room-number" name="roomNumber" class="input inline" />
              <div class="search" onclick="availableRooms()">&nbsp;</div>
            </td>
          </tr>
          <tr>
            <td id="checkin-mesg" colspan="2"></td>
          </tr>
        </table>
      </div>
      <div class="clear"></div>
    </div>
  </div>

  <div class="button abs" style="bottom:12px; right:12px;">
    <button id="checkin-back-btn" class="disabled" onclick="checkinBack()"><?php __('&lt; Back'); ?></button>
    <button id="checkin-next-btn" onclick="checkinNext()"><?php __('Next &gt;'); ?></button>
    <button class="close margin_close"><?php __('Cancel'); ?></button>
  </div>
</div>

<div id="available-room" title="<?php __('Display Available Rooms'); ?>" class="dialog" style="display:none;">
  <div class="fLeft" style="width:795px; margin-top:8px; border:1px solid #ccc;">
    <div class="gridToolbar" style="padding:3px 0 0 3px;">
      <div class="fLeft">
        <?php __('Checkout Date'); ?>: <input type="text" id="ar-checkoutDate" value="Choose a Date" class="input inline" style="width:130px;" />
        <div style="display:inline; margin-left:20px;"></div>
        <select id="ar-adults" style="width:80px;">
          <option value="1">1 Adult</option>
          <option value="2">2 Adults</option>
          <option value="3">3 Adults</option>
          <option value="4">4 Adults</option>
          <option value="5">5 Adults</option>
        </select>
        <select id="ar-children" style="width:80px;">
          <option value="0">No Child</option>
          <option value="1">1 Child</option>
          <option value="2">2 Children</option>
          <option value="3">3 Children</option>
          <option value="4">4 Children</option>
          <option value="5">5 Children</option>
        </select>
        <div class="search" onclick="checkAvailablity();">&nbsp;</div>
      </div>
      <div class="ar-gridStatus" style="display:none;"><?php __('loading'); ?>..</div>
    </div>
    <div style="clear:both;"></div>
    <div id="ar-grid-list-body" style="overflow:auto; width:795px; height:337px;"></div>
  </div>
  <div class="clear"></div>
</div>
<div id="reservation-total-stay-wrap" title="<?php __('Total Stay'); ?>" class="dialog" style="display:none;">
  <form class="form">
    <div class="tabs">
      <ul>
        <li><a href="#totalstay-1"><?php __('Summary'); ?></a></li>
        <li><a href="#totalstay-2"><?php __('Rate Details'); ?></a></li>
      </ul>
      <div id="totalstay-1">
        <div style="margin-bottom:8px;"><?php __('The following simulates the posting cycle for the current rate for the entire stay.'); ?><br />
        <?php __('This amount should be collected from the guest if paying at checkin.'); ?></div>
        <div class="fLeft">
          <fieldset class="fs">
            <legend><?php __('Stay Information'); ?></legend>
            <table width="320" cellpadding="3" cellspacing="0" border="0">
              <tr>
                <td><?php __('CheckIn'); ?>:</td>
                <td id="rsv-checkin-txt"></td>
                <td id="rsv-checkin-day-txt"></td>
              </tr>
              <tr>
                <td><?php __('Nights'); ?>:</td>
                <td id="rsv-nights-txt"></td>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td><?php __('CheckOut'); ?>:</td>
                <td id="rsv-checkout-txt"></td>
                <td id="rsv-checkout-day-txt"></td>
              </tr>
            </table>
          </fieldset>
          <fieldset class="fs" style="margin-top:5px;">
            <legend><?php __('Room/Rate Information'); ?></legend>
            <table width="100%" cellpadding="3" cellspacing="0" border="0">
              <tr>
                <td><?php __('Rooms/Type'); ?>:</td>
                <td id="rsv-roomType-txt"></td>
              </tr>
              <tr>
                <td><?php __('Rate Code'); ?>:</td>
                <td id="rsv-rateCode-txt"></td>
              </tr>
              <tr>
                <td><?php __('Discount percent'); ?>:</td>
                <td id="rsv-discount-txt"></td>
              </tr>
            </table>
          </fieldset>
        </div>
        <div class="fLeft">
          <fieldset class="fs fLeft">
            <legend><?php __('Charge Information'); ?></legend>
            <table width="180" cellpadding="3" cellspacing="0" border="0">
              <tr>
                <td><?php __('Total Room'); ?>:</td>
                <td id="rsv-totalRoom-txt" align="right">0.00</td>
              </tr>
              <tr>
                <td><?php __('Sub Total'); ?>:</td>
                <td id="rsv-subTotal-txt" align="right">0.00</td>
              </tr>
              <tr>
                <td><?php __('Daily Charge'); ?>:</td>
                <td id="rsv-daily-charge-txt" align="right">0.00</td>
              </tr>
              <tr>
                <td colspan="2" style="padding:5px 0 8px;">
                  <div class="white bold radius2" style="background-color:#008000; padding:3px 5px;">
                    <div class="fLeft"><?php __('Total Stay'); ?>:</div>
                    <div id="rsv-total-stay" class="fRight">0.00</div>
                    <div class="clear"></div>
                  </div>
                </td>
              </tr>
              <tr>
                <td><?php __('Avg night'); ?>:</td>
                <td id="rsv-avgNight-txt" align="right">0.00</td>
              </tr>
            </table>
          </fieldset>
        </div>
        <div class="clear"></div>
      </div>
      <div id="totalstay-2">
          <fieldset class="fs">
            <legend><?php __('Rate Details'); ?></legend>
            <table id="rateDetailsList"></table>
          </fieldset>
      </div>
    </div>
    <div class="formMessage"></div>
    <div class="button">
      <button type="button" class="close"><?php __('Close'); ?></button>
    </div>
  </form>
</div>

<div id="display-rate-wrap" title="<?php __('Display Rates'); ?>" class="dialog" style="display:none;">
  <table id="displayRateList"></table>
</div>

<div id="reservation-wrap" title="<?php __('Reservations'); ?>" class="dialog" style="display:none;">
  <table id="reservationlist"></table>
</div>
<div id="reservation-form-wrap" title="<?php __('Confirmation'); ?>" class="dialog" style="display:none;">
  <form id="ReservationSaveForm" method="post" action="<?php e($this->base) ?>/reservations/save" class="form" onsubmit="return reservation.save();">
    <div class="tabs">
      <ul>
        <li><a href="#reserve-1"><?php __('General Information'); ?></a></li>
        <li><a href="#reserve-2"><?php __('Other Information'); ?></a></li>
        <li><a href="#reserve-3"><?php __('Notes'); ?></a></li>
      </ul>
      <div id="reserve-1">
        <fieldset class="fs fLeft">
          <legend><?php __('Stay Information'); ?></legend>
<?php
    echo $this->element('stay_information', array('ext' => 'rsv-'));
?>
        </fieldset>
        <fieldset class="fs fLeft">
          <legend><?php __('Personal Information'); ?></legend>
<?php
    echo $this->element('personal_information', array('ext' => 'rsv-'));
?>
        </fieldset>
        <div class="clear"></div>
      </div>
      <div id="reserve-2">
          <fieldset class="fs">
            <legend><?php __('Other Information'); ?></legend>
<?php
    echo $this->element('other_information', array('ext' => 'rsv-'));
?>
          </fieldset>
          <fieldset class="fs" style="margin-top:5px;">
            <legend><?php __('Audit Information'); ?></legend>
            <div id="rsv-created" style="margin-top:4px;"><?php __('(Never Created)'); ?></div>
            <div id="rsv-modified" style="margin-top:4px;"><?php __('(Never Modified)'); ?></div>
            <div id="rsv-cancelled" style="margin-top:4px;"><?php __('(Never Cancelled)'); ?></div>
          </fieldset>
      </div>
      <div id="reserve-3">
       <fieldset class="fs">
          <legend><?php __('Guest Notes'); ?></legend>
          <textarea id="rsv-notes" name="notes" style="width:643px; height:240px;"></textarea>
       </fieldset>
      </div>
    </div>
    <div class="formMessage"></div>
    <div class="button">
      <input type="hidden" id="rsv-guest_id" name="guest_id" />
      <input type="hidden" id="rsv-room_number" name="room_number" />
      <button type="button" class="assignRoom" onclick="reservation.assignRooms()"><?php __('Assign Rooms'); ?></button>
      <button type="button" onclick="reservation.totalStay()"><?php __('Total Stay'); ?></button>
      <button type="button" onclick="openGuestList('rsv-')"><?php __('Guest Profiles'); ?></button>
      <button type="submit" id="guest-profile-btn"><?php __('CheckIn'); ?></button>
      <button type="button" class="close"><?php __('Cancel'); ?></button>
    </div>
  </form>
</div>
<div id="reservation-assign-rooms-wrap" title="<?php __('Assign Rooms'); ?>" class="dialog" style="display:none;">
  <form class="form">
    <fieldset class="fs fLeft" style="padding-top:8px;">
      <legend><?php __('Available rooms'); ?></legend>
      <table id="available-rooms-list" cellpadding="3" cellspacing="0" border="0"></table>
    </fieldset>
    <div class="fLeft button" style="padding:5px;">
      <button type="button" id="rsv-assign-btn" style="width:85px;" onclick="reservation.assign();"><?php __('Assign >'); ?></button><br />
      <button type="button" id="rsv-removeAssign-btn" style="width:85px; margin-top:8px;" onclick="reservation.removeAssign()"><?php __('< Remove'); ?></button><br />
      <button type="button" class="close" style="width:85px; margin-top:25px;"><?php __('Close'); ?></button>
    </div>
    <fieldset class="fs fLeft" style="padding-top:8px;">
      <legend><?php __('Assigned rooms'); ?></legend>
      <table id="assigned-rooms-list" cellpadding="3" cellspacing="0" border="0"></table>
      <table width="100%" cellpadding="2" cellspacing="0" border="0" style="color:#000080; margin-top:5px;">
        <tr>
          <td><?php __('Rooms Reserved'); ?>:</td>
          <td id="rsv-rm-reserved" align="right">0</td>
        </tr>
        <tr>
          <td><?php __('Rooms Assigned'); ?>:</td>
          <td id="rsv-rm-assigned" align="right">0</td>
        </tr>
        <tr>
          <td><?php __('Unassigned Rooms'); ?>:</td>
          <td id="rsv-rm-unassigned" align="right">0</td>
        </tr>
      </table>
    </fieldset>
    <div class="clear"></div>
  </form>
</div>


<div id="walkin-guest-folio" title="<?php __('WalkIn Guest'); ?>" class="dialog" style="display:none;">
  <div class="dialogHeader"><?php __('Room Number'); ?>: <span id="walkin-room-number"></span> &nbsp; <?php __('Room Type'); ?>: <span id="walkin-room-type"></span></div>
  <form id="WalkinSaveForm" method="post" action="<?php e($this->base) ?>/reservations/save" class="form" onsubmit="return saveWalkin();">
    <div class="tabs">
      <ul>
        <li><a href="#folio-1"><?php __('General Information'); ?></a></li>
        <li><a href="#folio-2"><?php __('Other Information'); ?></a></li>
        <li><a href="#folio-3"><?php __('Housekeeping'); ?></a></li>
        <li><a href="#folio-4"><?php __('Notes'); ?></a></li>
      </ul>
      <div id="folio-1">
        <fieldset class="fs fLeft">
          <legend><?php __('Personal Information'); ?></legend>
<?php
    echo $this->element('personal_information', array('ext' => 'wi-'));
?>
        </fieldset>
        <fieldset class="fs fLeft">
          <legend><?php __('Stay Information'); ?></legend>
<?php
    echo $this->element('stay_information', array('ext' => 'wi-'));
?>
        </fieldset>
        <div class="clear"></div>
      </div>
      <div id="folio-2">
        <fieldset class="fs">
          <legend><?php __('Payment Information'); ?></legend>
<?php
    echo $this->element('other_information', array('ext' => 'wi-'));
?>
        </fieldset>
      </div>
      <div id="folio-3">
        <fieldset class="fs">
          <legend><?php __('Normal Housekeeping Days'); ?></legend>
          <p>under development..</p>
        </fieldset>
      </div>
      <div id="folio-4">
       <fieldset class="fs">
          <legend><?php __('Guest Notes'); ?></legend>
          <textarea id="wi-notes" name="notes" style="width:643px; height:240px;"></textarea>
       </fieldset>
      </div>
    </div>
    <div class="formMessage"></div>
    <div class="button">
      <input type="hidden" id="wi-guest_id" name="guest_id" />
      <input type="hidden" id="wi-room_type_id" name="room_type_id" />
      <input type="hidden" id="wi-room_number" name="room_number" />
      <button type="button" onclick="openGuestList('wi-')"><?php __('Guest Profiles'); ?></button>
      <button type="submit" id="guest-profile-btn"><?php __('CheckIn'); ?></button>
      <button type="button" class="close"><?php __('Cancel'); ?></button>
    </div>
  </form>
</div>

<div id="guest-profiles-wrap" title="<?php __('Guest Profiles'); ?>" class="dialog" style="display:none;">
  <table id="guestlist"></table>
</div>

<div id="guest-profile-wrap" title="<?php __('Guest Profile'); ?>" class="dialog" style="display:none;">
      <form id="GuestSaveForm" method="post" action="<?php e($this->base) ?>/guests/save" class="form" onsubmit="return saveGuestProfile();">
        <fieldset class="fs">
          <legend><?php __('Name and Address'); ?></legend>
            <table cellpadding="3" cellspacing="0" border="0">
              <tr>
                <td><label for="title"><?php __('Title'); ?>:</label></td>
                <td><input type="text" id="title" name="title" class="validate[required,length[2,20]]" style="width:80px;" /></td>
              </tr>
              <tr>
                <td><label for="first_name"><?php __('First Name'); ?>:</label></td>
                <td><input type="text" id="firstname" name="firstname" class="validate[required,length[2,50]]" /></td>
              </tr>
              <tr>
                <td><label for="last_name"><?php __('Last Name'); ?>:</label></td>
                <td><input type="text" id="lastname" name="lastname" class="validate[required,length[2,50]]" /></td>
              </tr>
              <tr>
                <td><label for="street"><?php __('Street'); ?>:</label></td>
                <td><input type="text" id="street" name="street" class="validate[optional,length[2,255]]" style="width:250px;" /></td>
              </tr>
              <tr>
                <td><label for="city"><?php __('City'); ?>:</label></td>
                <td><input type="text" id="city" name="city" class="validate[optional,length[2,50]]" style="width:250px;" /></td>
              </tr>
              <tr>
                <td><label for="state"><?php __('State'); ?></label></td>
                <td><input type="text" id="state" name="state" class="validate[optional,length[2,50]]" /></td>
              </tr>
              <tr>
                <td><label for="zip_code"><?php __('Zip Code'); ?></label></td>
                <td><input type="text" id="zip_code" name="zip_code" class="validate[optional,length[2,20]]" /></td>
              </tr>
              <tr>
                <td><label for="country"><?php __('Country'); ?></label></td>
                <td><input type="text" id="country" name="country" class="validate[optional,length[2,50]]" /></td>
              </tr>
              <tr>
                <td><label for="phone"><?php __('Phone'); ?></label></td>
                <td><input type="text" id="phone" name="phone" class="validate[required,length[7,20]]" /></td>
              </tr>
              <tr>
                <td><label for="email"><?php __('E-mail'); ?></label></td>
                <td><input type="text" id="email" name="email" class="validate[optional,custom[email]]" style="width:250px;" /></td>
              </tr>
            </table>
        </fieldset>
        <div class="formMessage"></div>
        <div class="button">
          <input type="hidden" id="id" name="id" />
          <button type="submit" id="guest-profile-btn"><?php __('Save'); ?></button>
          <button type="button" class="close"><?php __('Cancel'); ?></button>
        </div>
      </form>
</div>

<div id="rate-info-wrap" title="<?php __('Rate Information'); ?>" class="dialog" style="display:none;">
  <table id="ratelist"></table>
</div>

<div id="rate-form-wrap" title="<?php __('Rates Record'); ?>" class="dialog" style="display:none;">
  <form id="RateSaveForm" method="post" action="<?php e($this->base) ?>/rates/save" class="form" onsubmit="return rateInfo.save();">
    <div class="tabs">
      <ul>
        <li><a href="#rate-record-1"><?php __('General'); ?></a></li>
        <li><a href="#rate-record-2"><?php __('Amounts'); ?></a></li>
      </ul>
      <div id="rate-record-1">
        <fieldset class="fs">
          <legend><?php __('Rate Information'); ?></legend>
            <table cellpadding="3" cellspacing="0" border="0">
              <tr>
                <td><label for="rr-code"><?php __('Rate Code'); ?>:</label></td>
                <td>
<?php
    echo $this->element('rate_code_options', array(
        'ext' => 'rr-'
    ));
?>
                </td>
                <td><label for="rr-room_type_id"><?php __('Room Type'); ?>:</label></td>
                <td>
<?php
    echo $this->element('room_type_options', array(
        'ext'     => 'rr-',
        'loadAll' => true
    ));
?>
                </td>
              </tr>
              <tr>
                <td><label for="rr-from"><?php __('From Date'); ?>:</label></td>
                <td><input type="text" id="rr-from" name="from" class="validate[required,custom[date2]]" style="width:70px;" /></td>
                <td><label for="rr-to"><?php __('To Date'); ?>:</label></td>
                <td><input type="text" id="rr-to" name="to" class="validate[required,custom[date2]]" style="width:70px;" /></td>
              </tr>
              <tr>
                <td><label for="rr-description"><?php __('Description'); ?>:</label></td>
                <td colspan="3"><input type="text" id="rr-description" name="description" class="validate[optional,length[2,255]]" style="width:300px;" /></td>
              </tr>
            </table>
        </fieldset>
        <fieldset class="fs" style="margin-top:5px; display:none;">
          <legend><?php __('Available to Use'); ?></legend>
            <table cellpadding="3" cellspacing="0" border="0">
              <tr>
                <td><input type="checkbox" id="rr-available" value="monday" /></td>
                <td><label for="rr-available"><?php __('Monday'); ?>:</label></td>
              </tr>
            </table>
        </fieldset>
        <div class="clear"></div>
      </div>
      <div id="rate-record-2">
        <fieldset class="fs">
          <legend><?php __('Base Rate - Rate to Charge'); ?></legend>
            <table cellpadding="3" cellspacing="0" border="0">
              <tr>
                <td>&nbsp;</td>
                <td><u><?php __('One Adult'); ?></u></td>
                <td><u><?php __('Two Adults'); ?></u></td>
                <td><u><?php __('Three Adults'); ?></u></td>
                <td><u><?php __('Four Adults'); ?></u></td>
              </tr>
              <tr>
                <td><?php __('Weekday'); ?>:</td>
                <td><input type="text" id="rr-d_1" name="d_1" class="onlyMoney" style="width:60px;" /></td>
                <td><input type="text" id="rr-d_2" name="d_2" class="onlyMoney" style="width:60px;" /></td>
                <td><input type="text" id="rr-d_3" name="d_3" class="onlyMoney" style="width:60px;" /></td>
                <td><input type="text" id="rr-d_4" name="d_4" class="onlyMoney" style="width:60px;" /></td>
              </tr>
              <tr>
                <td><?php __('Weekend'); ?>:</td>
                <td><input type="text" id="rr-e_1" name="e_1" class="onlyMoney" style="width:60px;" /></td>
                <td><input type="text" id="rr-e_2" name="e_2" class="onlyMoney" style="width:60px;" /></td>
                <td><input type="text" id="rr-e_3" name="e_3" class="onlyMoney" style="width:60px;" /></td>
                <td><input type="text" id="rr-e_4" name="e_4" class="onlyMoney" style="width:60px;" /></td>
              </tr>
              <tr>
                <td>&nbsp;</td>
                <td><u><?php __('Extra Adult'); ?></u></td>
                <td><u><?php __('Extra Child'); ?></u></td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td><?php __('Weekday'); ?>:</td>
                <td><input type="text" id="rr-extra_adult_weekday" name="extra_adult_weekday" class="onlyMoney" style="width:60px;" /></td>
                <td><input type="text" id="rr-extra_child_weekday" name="extra_child_weekday" class="onlyMoney" style="width:60px;" /></td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td><?php __('Weekend'); ?>:</td>
                <td><input type="text" id="rr-extra_adult_weekend" name="extra_adult_weekend" class="onlyMoney" style="width:60px;" /></td>
                <td><input type="text" id="rr-extra_child_weekend" name="extra_child_weekend" class="onlyMoney" style="width:60px;" /></td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
            </table>
        </fieldset>
      </div>
    </div>
    <div class="formMessage"></div>
    <div class="button">
      <input type="hidden" id="rr-id" name="id" />
      <button type="submit"><?php __('Save'); ?></button>
      <button type="button" class="close"><?php __('Cancel'); ?></button>
    </div>
  </form>
</div>

<div id="hotel-info-wrap" title="<?php __('Hotels'); ?>" class="dialog" style="display:none;">
  <table id="hotellist"></table>
</div>

<div id="hotel-form-wrap" title="<?php __('Hotel Info'); ?>" class="dialog" style="display:none;">
      <form id="HotelSaveForm" method="post" action="<?php e($this->base) ?>/hotels/save" class="form" onsubmit="return hotel.save();">
        <fieldset class="fs">
          <legend><?php __('Hotel Name and Address'); ?></legend>
            <table cellpadding="3" cellspacing="0" border="0">
              <tr>
                <td><label for="htl-name"><?php __('Name'); ?>:</label></td>
                <td><input type="text" id="htl-name" name="name" class="validate[required,length[2,20]]" /></td>
              </tr>
              <tr>
                <td><label for="htl-street"><?php __('Street'); ?>:</label></td>
                <td><input type="text" id="htl-street" name="street" class="validate[optional,length[2,255]]" style="width:250px;" /></td>
              </tr>
              <tr>
                <td><label for="htl-city"><?php __('City'); ?>:</label></td>
                <td><input type="text" id="htl-city" name="city" class="validate[optional,length[2,50]]" /></td>
              </tr>
              <tr>
                <td><label for="htl-state"><?php __('State'); ?></label></td>
                <td><input type="text" id="htl-state" name="state" class="validate[optional,length[2,50]]" /></td>
              </tr>
              <tr>
                <td><label for="htl-zip_code"><?php __('Zip Code'); ?></label></td>
                <td><input type="text" id="htl-zip_code" name="zip_code" class="validate[optional,length[2,20]]" /></td>
              </tr>
              <tr>
                <td><label for="phone"><?php __('Phone'); ?></label></td>
                <td><input type="text" id="htl-phone" name="phone" class="validate[optional,length[7,20]]" /></td>
              </tr>
              <tr>
                <td><label for="htl-fax"><?php __('Fax'); ?></label></td>
                <td><input type="text" id="htl-fax" name="fax" class="validate[optional,length[7,20]]" /></td>
              </tr>
              <tr>
                <td><label for="email"><?php __('E-mail'); ?></label></td>
                <td><input type="text" id="htl-email" name="email" class="validate[required,custom[email]]" style="width:250px;" /></td>
              </tr>
            </table>
        </fieldset>
        <div class="formMessage"></div>
        <div class="button">
          <input type="hidden" id="htl-id" name="id" />
          <button type="submit"><?php __('Save'); ?></button>
          <button type="button" class="close"><?php __('Cancel'); ?></button>
        </div>
      </form>
</div>

<div id="dialog-message" title="<?php __('Message'); ?>" class="dialog" style="display:none;">
  <p>
    <span id="message-icon" class="warning" style="float:left; margin:0 7px 50px 0;"></span>
    <span id="message-body"></span>
  </p>
</div>

<?php
  if (is_array($javascripts)) {
      foreach ($javascripts as $js) {
          e($javascript->link($js));
      }
  }
?>

<script type="text/javascript">
var _rates         = <?php echo is_array($rates) ? $javascript->object($rates) : '[]'; ?>;
var _defRoomTypeId = '<?php echo isset($roomTypes[0]['RoomType']['id']) ? $roomTypes[0]['RoomType']['id'] : ''; ?>';
var _roomTypes = new Array();
var _roomCodes = new Array();
<?php
    foreach ($roomTypes as $l) {
        e('_roomTypes['.$l['RoomType']['id'].'] = "'.htmlspecialchars($l['RoomType']['description']).'"; ');
    }
    e('_roomTypes[0] = "('.__('All Room Types', true).')";');
    e("\r\n");

    foreach ($roomTypes as $l) {
        e('_roomCodes['.$l['RoomType']['id'].'] = "'.htmlspecialchars($l['RoomType']['code']).'"; ');
    }
    e('_roomCodes[0] = "('.__('*ALL', true).')";');
    e("\r\n");

    if ($scripts_for_layout) {
        e($scripts_for_layout);
        e("\n");
    }
?>
</script>
<div style="color:#ccc;">
  <?php e($cakeDebug); ?>
</div>
</body>
</html>